import "./index.scss";
import { useNavigate, useLocation } from "react-router-dom";
import { Image } from "antd";

const TeacherDetail3 = () => {
  //取数据
  const state = useLocation();
  console.log("state", state.state);

  //返回老师页面
  const navigate = useNavigate();
  const back = () => {
    navigate("/home/TeacherManage");
  };

  return (
    <div className="teacherDetail">
      <div className="top">
        <div className="top-l">
          <div className="title" onClick={back}>
            老师管理
          </div>
          <div>&gt;</div>
          <div className="detail">详情</div>
        </div>
      </div>

      <div className="hr"></div>

      <div className="context-box">
        <div className="con1">
        <Image width={150} height={220} src={state.state.zjphoto} />
          <div className="name">{state.state.tname}</div>
          <div className="state">{state.state.tstate}</div>
        </div>

        <div className="con2">
          <div className="detail">
            <div className="allTitle">
              <div className="title">所属机构</div>
              <div className="title">教学学科</div>
              <div className="title">性别</div>
              <div className="title">出生年月</div>
              <div className="title">毕业院校专业</div>
              <div className="title">学历</div>
              <div className="title">政治面貌</div>
              <div className="title">籍贯</div>
              <div className="title">是否签约合同</div>
              <div className="title">身份证号码</div>
              <div className="title">资格证类型</div>
              <div className="title">教师资格证种类</div>
              <div className="title">教师资格证编码</div>
            </div>
            <div>
              <div className="text">{state.state.tinstitution}</div>
              <div className="text">{state.state.tcourse}</div>
              <div className="text">{state.state.tsex}</div>
              <div className="text">{state.state.tborn}</div>
              <div className="text">{state.state.graduate}</div>
              <div className="text">{state.state.tdegree}</div>
              <div className="text">{state.state.tface}</div>
              <div className="text">{state.state.origin}</div>
              <div className="text">{state.state.contract}</div>
              <div className="text">{state.state.tidentity}</div>
              <div className="text">教师资格证</div>
              <div className="text">{state.state.tqualtype}</div>
              <div className="text">{state.state.tqualification}</div>
            </div>
          </div>
          <div className="allphoto">
            <div className="ap1">
              <div className="title">身份证照片</div>
              <Image width={100} height={100} src={state.state.idphoto} />
            </div>
            <div className="ap1">
              <div className="title">学历证照片</div>
              <Image width={100} height={100} src={state.state.xlphoto} />
            </div>
            <div className="ap1">
              <div className="title">教师资格证照片</div>
              <Image width={100} height={100} src={state.state.jsphoto} />
            </div>
          </div>
        </div>
      </div>
    </div>
  );
};

export default TeacherDetail3;
